import request from '@/utils/request'
//查询数据
export function getAgents() {
    return request({
        url: '/agents'
    })
}
//查询指定数据
export function getAgentstable(id) {
    return request({
        url: `/agents/${id}`
    })
}
//删除接口
export function delAgents(id) {
    return request({
        url: `/agents/${id}`,
        method: 'delete'
    })
}
export function postAgents(data) {
    return request({
        url: '/agents',
        method: 'post',
        data
    })
}
// 修改
export function editAgents(data) {
    return request({
        url: `/agents/${data.id}`,
        method: 'put',
        data
    })
}
// 获取分页总数
export function pgAgents(params) {
    return request({
        url: `/agents`,
        params
    })
}